/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class DAL {

    public static MyConnectUnit getDAL() throws IOException {
    	Properties prop = new Properties();
		InputStream inputStream = DAL.class.getClassLoader().getResourceAsStream("./db.properties");
		prop.load(inputStream);
		String driver = prop.getProperty("driver");
		String host = prop.getProperty("host");
		String user = prop.getProperty("user");
		String password = prop.getProperty("password");
		String database = prop.getProperty("database");
        
		return new MyConnectUnit(driver,host,user,password,database);
    }
}
